#include "wgun.h"
#include "pspread.h"
#include <OgreEntity.h>
#include <stdio.h>
#include <OgreMath.h>
#include "OgreParticleSystem.h"
#include <OgreParticleEmitter.h>

WGun::WGun(World *world, int numOfProjectiles, int rof): Weapon(world, numOfProjectiles, rof){}

Projectile* WGun::getProjectile(int projectileAtIndex){
    return m_projectiles[projectileAtIndex];
}

void WGun::reload(){
    for(int i = 0; i < m_numOfProjectiles; i++){
        m_projectiles[i] = new PSpread(m_world, 1000, 50, i * (Ogre::Math::RangeRandom(-m_numOfProjectiles,m_numOfProjectiles)));
        m_projectiles[i]->setDamage(2);
        m_projectiles[i]->setNpc(false);
    }
}
